//
//  NowDate.h
//  WinnerLife
//
//  Created by 李小龙 on 14-12-22.
//  Copyright (c) 2014年 李小龙. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface DateSomeThing : NSObject

@property (assign, nonatomic) NSInteger year;
@property (assign, nonatomic) NSInteger month;
@property (assign, nonatomic) NSInteger day;
@property (assign, nonatomic) NSString * week;
@property (assign, nonatomic) NSInteger hour;
@property (assign, nonatomic) NSInteger min;
@property (assign, nonatomic) NSInteger sec;

/**
 *  年月日
 */
+(NSString *)getNowDate;

/**
 *  年月日时分秒
 */
+(NSString *)getNowDateAll;

/**
 *  获取间隔天数的日期
 */
+(NSString *)GetDay:(NSDate *)aDate gap:(NSInteger)gap returnDateFormat:(NSString *)dateFormatStr;

/**
 *  date转字符串
 */
+(NSString *)getDateStr:(NSDate *)date dateFormat:(NSString *)dateFormat;

/**
 *  字符串转date
 */
+(NSDate *)getDateWithString:(NSString *)dateStr dateFormat:(NSString *)dateFormat;

/**
 *  时间戳字符串转成date
 */
+(NSDate *)getDateWithTimestampstr:(NSString*)timestampstr;

/**
 时间戳字符串转时间字符串

 @param timestampstr 时间戳字符串
 @param formatStr 转完的时间格式
 @return 时间字符串
 */
+(NSString *)getDateStrWithTimestampstr:(NSString*)timestampstr formatStr:(NSString *)formatStr;
/**
 *  获取字符串时间的单独的年、月、日、时、分、秒、周几
 */
+(DateSomeThing *)createWithString:(NSString *)dateStr dateFormat:(NSString *)dateFormat;

/**
 *  比较两个字符串时间相差的单独的年、月、日、时、分、秒
 */
+(DateSomeThing *)getWithStartDateStr:(NSString *)startStr startDateFormat:(NSString *)startFormatStr endDateStr:(NSString *)endStr endDateFormat:(NSString *)endFormatStr;

/**
 *  比较两个字符串时间相差日时分秒
 */
+(NSString *)getStringWithStartDateStr:(NSString *)startStr startDateFormat:(NSString *)startFormatStr endDateStr:(NSString *)endStr endDateFormat:(NSString *)endFormatStr;

/**
 * 比较传入日期和当前日期相差日时分秒
 */
+(NSString *)getStringWithCurrentDateStr:(NSString *)currentStr currentDateFormat:(NSString *)currentFormatStr;

/**
 * 比较传入日期和当前日期相差分钟数
 */
+(CGFloat)getStringWithCurrentTimestamp:(NSString *)timestamp;

/**
 *  根据不同的样式转换日期
 */
+(NSString *)getDateStr:(NSString *)inStr inDateFormat:(NSString *)inFormatStr outDateFormat:(NSString *)outFormatStr;

/**
 *  时间戳字符串转化成时间
 */
+(NSString*)timestampToTimeStringWithFormat:(NSString*)str timestampstr:(NSString*)timestampstr;

/**
 时间字符串转化成时间戳

 @param dateStr 时间字符串
 @param format 时间格式
 @return 时间戳
 */
+(NSString *)getTimestampDateStr:(NSString *)dateStr format:(NSString *)format;
@end
